/*
 * Copyright 2013 Solace Systems, Inc.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.solacesystems.tools.ant;

import org.xml.sax.Locator;

public final class TestConst {
	public static final class StringLocator implements Locator {
		private final String sys;
		private final String pub;
		
		public StringLocator(String sys, String pub) {
			this.sys = sys;
			this.pub = pub;
		}

		@Override
		public String getPublicId() {
			return pub;
		}

		@Override
		public String getSystemId() {
			// TODO Auto-generated method stub
			return sys;
		}

		@Override
		public int getLineNumber() {
			// TODO Auto-generated method stub
			return 10;
		}

		@Override
		public int getColumnNumber() {
			// TODO Auto-generated method stub
			return 100;
		}
	}
	
	public static final String GOOD_URI_STR = "http://example.com";
	public static final String GOOD_URI_STR2 = "http://example.org/banana/";
	public static final String GOOD_URI_STR3 = "http://example.ca";
	public static final String BAD_URI_STR = "http://ex ample.com";
	public static final String BAD_URI_STR2 = "http://example.org/badurl/?banana=hello world";
	public static final String BAD_URI_STR3 = "http://example.org/badurl/?banana=hello world#weeeeee";
	
	public static final Locator BAD_URI_LOCATOR = new StringLocator(BAD_URI_STR, BAD_URI_STR);
	public static final Locator BAD_URI_LOCATOR2 = new StringLocator(BAD_URI_STR2, BAD_URI_STR2);
	public static final Locator BAD_URI_LOCATOR3 = new StringLocator(BAD_URI_STR3, BAD_URI_STR3);
	
	public static final Locator GOOD_LOCATOR = new StringLocator(GOOD_URI_STR, GOOD_URI_STR);
	public static final Locator GOOD_LOCATOR2 = new StringLocator(GOOD_URI_STR2, GOOD_URI_STR2);
	public static final Locator GOOD_LOCATOR3 = new StringLocator(GOOD_URI_STR3, GOOD_URI_STR3);
	
	public static final Location UNKNOWN_LOCATION = new Location();
	public static final Location KNOWN_LOCATION = new Location("file.html", 10, 100);
}
